<?php
session_start();
require('config.php');
require('lib/db_connect.php');
?>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="author" content="Invisible Man" />
    <link rel="stylesheet" type="text/css" href="themes/<?=$front_end?>/css/styles.css"/>
	<title>Trang chủ</title>
</head>

<body>
    <div id="container">
        <div id="header"><img src="images/banner-shop.jpg"/></div>
        <div id="nav_bar">NAV Bar</div>
        <div id="box">
                <div id="box_col_left">
                <?php
                    $query = "SELECT * FROM item WHERE item_status=1 ORDER BY item_id LIMIT 0, 7";
                    $result = mysql_query($query, $con);
                    $count = 1;
                    while ($row = mysql_fetch_assoc($result)) {
                        if ($count < 7) {
                            echo '<a href="item.php?id=' .$row['item_id']. '" class="box_item"><img src="images/item/' .$row['item_img']. '" alt="' .$row['item_name']. '" /><div class="box_item_title">' .$row['item_name']. '</div></a>';                            
                        } else {
                            echo ' 
                            </div>
                            <div id="box_hot_container">
                                <a href="item.php?id=' .$row['item_id']. '" id="box_hot"><img src="images/item/' .$row['item_img']. '" alt="' .$row['item_name']. '" /><div id="box_hot_title">' .$row['item_name']. '</div></a>
                                <div id="box_nav">
                                    <a href="#" class="box_nav_item">1</a>
                                    <a href="#" class="box_nav_item">2</a>
                                    <a href="#" class="box_nav_item">3</a>
                                    <a href="#" class="box_nav_item">4</a>
                                </div>
                            </div>';
                        }
                        $count++;
                        
                    }
                ?>             
                
                <div class="clearfix"></div>
            </div>
        <div id="content">
            <div id="left-col">
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
                <a href="#" class="shop-item"><img src="images/no_avatar.jpg"/><div class="shop-name">Text</div></a>
            </div>
            <div id="right-col">
                Right
                <div class="module">
                    <h3></h3>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div id="footer">Copyright by InviShop v<?=$version?></div>
    </div>


</body>
</html>